include ../../config.make

CFLAGS = -g -fPIC \
		 -Wall \
		 -pedantic \
		 -I../../include
LDFLAGS = -L../../lib \
		  -llua \
		  -lluabindd

SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)

LIB = ../../lib/libtalos.so

#################
## MAKE TARGET ##
#################

all: $(LIB)

$(LIB): $(OBJ)
	$(CXX) -shared $(LDFLAGS) $(CFLAGS) $^ -o $@

%.o: %.cpp
	$(CXX) $(CFLAGS) -c $< -o $@

clean:
	$(RM) *.o

mrproper: clean
	$(RM) $(LIB)

